Skip to main content

Clock

Type

widget

Summary

This widget consists of an analogue clock. The clock has day and night style displays which are used depending on the time. The period interpreted as day by the clock is controlled by a pair of constants kStartDay and kEndDay, currently set at 6 and 20 respectively. Thus the clock will display in night style between the hours of 8pm and 6am. The style of the clock, can be controlled by setting the appropriate colors of the different components. For daytime this is through the dayNumberColor, dayHourHandColor, dayMinuteHandColor, daySecondHandColor and dayFaceColor properties. There are equivalent properties for the night style. The time displayed by the clock can differ from the current system local time by setting the timeZone property, an integer which adjusts the time displayed relative to universal time (UTC).

Description

This widget consists of an analogue clock. The clock has day and night style displays which are used depending on the time. The period interpreted as day by the clock is controlled by a pair of constants kStartDay and kEndDay, currently set at 6 and 20 respectively. Thus the clock will display in night style between the hours of 8pm and 6am. The style of the clock, can be controlled by setting the appropriate colors of the different components. For daytime this is through the dayNumberColor, dayHourHandColor, dayMinuteHandColor, daySecondHandColor and dayFaceColor properties. There are equivalent properties for the night style. The time displayed by the clock can differ from the current system local time by setting the timeZone property, an integer which adjusts the time displayed relative to universal time (UTC).

Children Properties

Property

NameSummarySyntax
dayHourHandColorDetermines the color of the hour hand on the clock during the dayget the dayHourHandColor of <widget> set the dayHourHandColor of <widget> to <color>
nightNumberColorDetermines the color of the numbers on the clock during the nightget the nightNumberColor of <widget> set the nightNumberColor of <widget> to <color>
dayMinuteHandColorDetermines the color of the minute hand on the clock during the dayget the dayMinuteHandColor of <widget> set the dayMinuteHandColor of <widget> to <color>
isDayWhether the clock's current display is in "day" mode.get the isDay of <widget>
nightHourHandColorDetermines the color of the hour hand on the clock during the nightget the nightHourHandColor of <widget> set the nightHourHandColor of <widget> to <color>
nightMinuteHandColorDetermines the color of the minute hand on the clock during the nightget the nightMinuteHandColor of <widget> set the nightMinuteHandColor of <widget> to <color>
daySecondHandColorDetermines the color of the second hand on the clock during the dayget the daySecondHandColor of <widget> set the daySecondHandColor of <widget> to <color>
nightSecondHandColorDetermines the color of the second hand on the clock during the nightget the nightSecondHandColor of <widget> set the nightSecondHandColor of <widget> to <color>
dayFaceColorDetermines the color of the face of the clock during the dayget the dayFaceColor of <widget> set the dayFaceColor of <widget> to <color>
dayNumberColorDetermines the color of the numbers on the clock during the dayget the dayNumberColor of <widget> set the dayNumberColor of <widget> to <color>
nightFaceColorDetermines the color of the face of the clock during the nightget the nightFaceColor of <widget> set the nightFaceColor of <widget> to <color>
timeZoneThe time zone offset from UTC, in seconds, or the empty stringget the timeZone of <widget> set the timeZone of <widget> to <pOffset>